<?php // Do not delete these lines
	if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
		die ('Please do not load this page directly. Thanks!');

	if (!empty($post->post_password)) { // if there's a password
		if ($_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) {  // and it doesn't match the cookie
			?>

			<p>This post is password protected. Enter the password to view comments.</p>

			<?php
			return;
		}
	}

	/* This variable is for alternating comment background */
	$oddcomment = 'class="alt" ';
?>

<!-- You can start editing here. -->
<div class="widget_reviews cont">

	<?php if ($comments) : ?>
	
		<ul>

		<?php foreach (array_reverse($comments) as $comment) : ?>
		<?php $comment_type = get_comment_type(); ?>
		<?php if($comment_type != 'comment') { $is_trackback = "is_trackback"; } ?>
		<?php if($comment_type == 'comment') { ?>
		<?php
			$PostAuthor = false;
			if($comment->comment_author_email == get_the_author_email()) {
			$PostAuthor = true;}
			elseif($comment->comment_author_email == 'sarah@neuber-web-solutions.de') {
			$PostAuthor = true;}
		?>
			<li <?php if($PostAuthor) {echo "class='authorcomment' ";} ?><?php echo $oddcomment; ?>id="comment-<?php comment_ID() ?>">
				<!--<?php echo get_avatar( $comment, 32 ); ?>-->
				
				<div class="comment_data">
					<p>
						<cite><?php comment_author_link() ?></cite>
						<br /><?php comment_date('F jS, Y') ?><br /> <?php edit_comment_link('edit','&nbsp;&nbsp;',''); ?>
					</p>
				</div><!--end comment_data -->
				
				<div class="comment_entry">
					<?php if ($comment->comment_approved == '0') : ?>
						<p class="waiting_mod">Your review is awaiting moderation.</p>
					<?php endif; ?>
					<?php comment_text() ?>
				</div><!--end comment_entry -->
			</li>	

		<?php
			/* Changes every other comment to a different class */
			$oddcomment = ( empty( $oddcomment ) ) ? 'class="alt" ' : '';
		?>
		<?php } /* End of is_comment statement */ ?>
		<?php endforeach; /* end for each comment */ ?>
		

		</ul>
	<?php if ($is_trackback == "is_trackback") { ?>
		<h3 class="tackback_title">Trackbacks</h3>
		<ul>
			<?php foreach ($comments as $comment) : ?>
				<?php $comment_type = get_comment_type(); ?>
					<?php if($comment_type != 'comment'){ ?>
						<li><?php comment_author_link(); ?></li>
					<?php } ?>
			
			<?php endforeach; ?>
		</ul>
	<?php } ?>
	
	<?php else : // this is displayed if there are no comments so far ?>
		
		<?php if ('open' == $post->comment_status) : ?>
			<!-- If comments are open, but there are no comments. -->
			<p>Be the first to write a review</p>
		 <?php else : // comments are closed ?>
			<!-- If comments are closed. -->
			<p>Comments are closed.</p>

		<?php endif; ?>
	<?php endif; ?>

	<?php if ('open' == $post->comment_status) : ?>
</div><!-- widget_reviews -->
<div class="widget_write cont">
	
	<?php if ( get_option('comment_registration') && !$user_ID ) : ?>
		<p>You must be <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php echo urlencode(get_permalink()); ?>">logged in</a> to post a review.</p>
	<?php else : ?>

	<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">

	<?php if ( $user_ID ) : ?>

		<p>Logged in as <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout" title="Log out of this account">Log out &raquo;</a></p>

	<?php else : ?>
		<label for="author">Name<span> <?php if ($req) echo "(required)"; ?></span></label>
		<input type="text" name="author" id="author" class="text" value="<?php echo $comment_author; ?>" size="22" tabindex="1" <?php if ($req) echo "aria-required='true'"; ?> /><br />
		
		<label for="email">Mail <span><?php if ($req) echo "(required"; ?> will not be published)</span></label>
		<input type="text" name="email" id="email" class="text" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" <?php if ($req) echo "aria-required='true'"; ?> /><br />
		
		<label for="url">Website</label>
		<input type="text" name="url" id="url" class="text" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" /><br />
	

	<?php endif; ?>

		
		<p class="notes"><strong>XHTML:</strong> You can use these tags: <br/><code><?php echo allowed_tags(); ?></code></p>
		<textarea name="comment" id="comment" cols="100%" rows="10" tabindex="4"></textarea><br />
		<input name="submit" type="submit" id="submit" class="btn" tabindex="5" value="Submit" />
		<input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
	<?php do_action('comment_form', $post->ID); ?>

	</form>

	<?php endif; // If registration required and not logged in ?>

	<?php endif; // if you delete this the sky will fall on your head ?>
</div><!-- widget_write-->
